import request from '@/utils/request'

// 查询礼品列表
export function listPresent(data) {
  return request({
    url: '/admin/present/pageList',
    method: 'post',
    data: data
  })
}

// 查询礼品详细
export function getPresent(id) {
  return request({
    url: '/admin/present/query/' + id,
    method: 'get'
  })
}

// 新增礼品
export function addPresent(data) {
  return request({
    url: '/admin/present/add',
    method: 'post',
    data: data
  })
}

// 修改礼品
export function updatePresent(data) {
  return request({
    url: '/admin/present/update',
    method: 'post',
    data: data
  })
}

// 删除礼品
export function delPresent(id) {
  return request({
    url: '/admin/present/delete/' + id,
    method: 'delete'
  })
}

// 导出礼品
export function exportPresent(query) {
  return request({
    url: '/admin/present/export',
    method: 'get',
    params: query
  })
}
